featureflag integer is a value to specify the feature you want to test
for. This can be one of the following values:
0 SP Voice Pause, SP Voice Cont, SP Voice Stop
accept -1 value and SP Voice reset available
1 SP Voice code available
2 SP Voice sound available
3 SP VOICES ARRAY available
4 SP SPEECH ON and SP SPEECH OFF available
5 SP Channel available (not with this version)
6 SP Pick Voice available
7 Speech Deamon support available (not with this
version)
(all other values are reserved for future use and will
return zero.)
status integer returns either zero (0) or one (1), were the
value one means that the specified feature is
available with the current version of Speech
Pack.
This function provides information about the capabilities of the installed Speech Pack external package.
This function allows you to test if the installed version of Speech Pack has the features you expect it to have. This is especially useful when you have no control over the versions of Speech Pack installed with the data-base. And perhaps future versions of Speech Pack don't include all functions currently present in particular those who are experimental like SP Voice sound and SP Pick Voice. Ofcourse I try to avoid this but I can't look into the future and perhaps I need to split the external into several others…
However, this function does NOT indicate if the feature can actually be used. I.e. if the System configuration is correct to use the SP Voice sound function.
Example:
`a simple example to test if the SP VOICES ARRAY command is available:
$present := SP Features (3)
`you may want to include this global procedure with your data-base.
`this is because this function wasn't implemented with Speech Pack
`2.0 and 2.1
`(I assume the chance is very low you will find Speech Pack 1.b2
`installed and that version is ignored here)
`$1 holds the feature flag (integer)
`$0 returns the status as a boolean
SP VERSION ($mgrvers;$packvers)
Case Of
:($packvers = "2.0")
$0 := FALSE
:($packvers = "2.1")
If ($1 = 0) | ($1 = 1) | ($1 = 2)
$0 := TRUE
Else
$0 := FALSE
End if
Else
$0 := (SP Features ($1) = 1)
End Case
`if you expect to find beta-versions of Speech Pack you must test if
`the $packvers variable starts with "2.0" or "2.1".